<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Iframe Title</title>
<meta charset=utf-8 />
<style type="text/css">
<!--
body {
-moz-box-shadow: 4px 4px 5px #888;
-webkit-box-shadow: 4px 4px 5px #888;
box-shadow: 4px 4px 5px #888;
}
-->
</style>
</head>
<body onload=sendSize() style='padding:5px;border-radius:10px;border:2px solid lightblue;background-color:transparent;margin:0;font-family:arial'>
<div id=containerDiv  style=background:#ABCDEF>
<table style='width:360px style=background:#ABCDEF'>

<tr>
<td>
<table style='width:100%;'>
<tr ><td id=drawVariableFrequencyTopTable style='width:90%' align=center ><span id=drawVariableFrequencyEditSpan>Draw Variable Frequencies</span>
&nbsp; &nbsp; &nbsp; Scale:<select  onchange=parent.changeVariableFrequency()  id="variableFrequencyScaleSelect">
<option>1.0</option>
<option>0.9</option>
<option>0.8</option>
<option>0.7</option>
<option>0.6</option>
<option>0.5</option>
<option>0.4</option>
<option selected>0.3</option>
<option>0.2</option>
<option>0.1</option>
</select>

</td><td align=right> <button onClick=parent.closeDrawVariableFrequency()  >X</button></td></tr>
<tr><td align=center colspan=2>

HMI Symbol SVG Source:<input type=checkbox  title="Show SVG source for this element"  id=sourceHMICheck  />


</td></tr>

</table>
</td>

</tr>
<TR><TD>

<table >
<tr>
<td>Title</td>
<td><input  onkeyup=parent.changeVariableFrequency()  id=titleValue type="text" autocomplete="off"  style=width:200px; value="Variable Frequency Title" /></td>
</tr>


<tr>
<td>Face Color</td>
<td id=faceColorBg><select id="faceColorVariableFrequencySelect" onChange=parent.faceColorVariableFrequencySelected()></select></td>
</tr>



</table>
</TD></TR>

<tr align=center>
<td>
	<button id=drawVariableFrequencyCancelButton disabled title='cancel/remove this circle' onClick=parent.cancelDrawVariableFrequency()>cancel</button>
    <button style='background-color:red;visibility:hidden' id=drawVariableFrequencyDeleteButton  onClick=parent.removeCurrentDrawVariableFrequency()>delete</button>
	<button id=drawVariableFrequencyTopButton style=background:white;font-size:120%;font-weight:bold;color:maroon;visibility:hidden  title='Move to top' onClick=parent.topDrawVariableFrequency()>&#x21E7;</button>
	<button id=drawVariableFrequencyBotButton style=background:white;font-size:120%;font-weight:bold;color:maroon;  title='Move to bottom' onClick=parent.botDrawVariableFrequency()>&#x21E9;</button>

    <button id=drawVariableFrequencyFinishButton disabled onClick=parent.finishDrawVariableFrequency()>finish</button>
</td>
</tr>

</table>
</div>


</body>
<script>
function writeVariableFrequencyColorSelection()
{
   var DrawColors=parent.clrArray
	for(var k=0;k<DrawColors.length;k++)
	{
		var name=DrawColors[k][0]
		var myColor=DrawColors[k][1]
		var option=document.createElement("OPTION")
		option.style.backgroundColor=myColor
		option.value=myColor
		option.title=name+" "+myColor
                if(parent.hexString.indexOf(myColor)!=-1)
        option.style.color="white"
		option.text=k
        faceColorVariableFrequencySelect.appendChild(option)




	}

    faceColorVariableFrequencySelect.selectedIndex=39  //---gold---
    var clr=faceColorVariableFrequencySelect.options[faceColorVariableFrequencySelect.selectedIndex].value
   faceColorBg.style.backgroundColor=clr



}



function sendSize()
{
   writeVariableFrequencyColorSelection()

   var width=containerDiv.scrollWidth+15
   var height=containerDiv.scrollHeight+30

   parent.sizeFrame('addElemVariableFrequency',width,height)


     if(parent.EditVariableFrequency==true)
        parent.setEditVariableFrequency()
        else
       parent.startVariableFrequencyDraw()

}


</script>
</html>